package com.kelvem.saas.workbanch.ontology.piaoorder.handle.core;

import com.kelvem.saas.workbanch.fsm.entity.Entity;
import com.kelvem.saas.workbanch.fsm.entity.FsmEntity;
import com.kelvem.saas.workbanch.fsm.core.EventContext;
import com.kelvem.saas.workbanch.fsm.handle.Handle;
import com.kelvem.saas.workbanch.fsm.model.EventNode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author kelvem
 */
@Service
@Slf4j
public class ConvPiaoOrder2ResponseHandle extends Handle {
    
    @Override
    public void execute() {
    
        // eventNode
        EventNode eventNode = EventContext.getEventNode();
        String dstState = eventNode.getDstState();
        
        // entity
        FsmEntity entity = Entity.instance().selectOne(eventNode.getEntityClazz());
        
        log.info("Handle[" + getName() + "] order=" + entity);
        EventContext.print();
    }
}
